//
//  TFSwitch.swift
//  TalkfunSDKDemo
//
//  Created by 莫瑞权 on 2022/5/5.
//  Copyright © 2022 Talkfun. All rights reserved.
//

import UIKit

class TFSwitch: UISwitch {
    @objc public let switchBtn = UIButton()
 
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.switchBtn.backgroundColor = UIColor.clear
        self.switchBtn.tintColor = UIColor(red: 76/255.0, green: 81/255.0, blue: 88/255.0, alpha: 1)
        self.addSubview(self.switchBtn)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        self.switchBtn.frame = self.bounds
        self.bringSubviewToFront(self.switchBtn)
  
    }
   
}
